package com.xdcplus.web.mapper.bd;

import com.xdcplus.mp.mapper.IBaseMapper;
import com.xdcplus.web.common.pojo.entity.bd.BdFactory;
import com.xdcplus.web.common.pojo.query.bd.BdFactoryQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工厂模型表(BdFactory)表数据库访问层
 *
 * @author Fish.Fei
 * @since 2023-01-31 13:35:21
 */
public interface BdFactoryMapper extends IBaseMapper<BdFactory> {

    /**
     * 查询工厂模型表(BdFactory)
     *
     * @param bdFactoryQuery 工厂模型表(BdFactory)查询
     * @return {@link List<BdFactory>}
     */
    List<BdFactory> queryBdFactory(BdFactoryQuery bdFactoryQuery);

    List<BdFactory> queryBdFactoryVOByParentId(@Param("parentId") Long parentId,
                                               @Param("factoryIds") List<Long> factoryIds);

    /**
     * 根据区域Code查询
     * @param regionCode
     * @return
     */
    BdFactory queryBdFactoryByRegionCode(String regionCode);


   List<BdFactory> queryBdFactoryByCodeIn(List<String> codeList);

    /**
     * 根据区域Name查询
     * @param regionName
     * @return
     */
    BdFactory queryBdFactoryByRegionName(String regionName);

    /**
    * @Description 根据code查询区域
    * @Author Devin.sang
    * @Date  2023/5/11 11:14
    */
    List<BdFactory> queryBdFactoryByRegionCodes( @Param("regionCodes") List<String> regionCodes);

    /**
    * @Description 根据设备code查询区域
    * @Author Devin.sang
    * @Date  2023/5/12 14:45
    */
    List<BdFactory> queryBayByToolCodes( @Param("toolCodes") List<String> toolCodes);

    /**
     * 根据区域Type查询
     * @param regionType
     * @return
     */
    List<BdFactory>  queryBdFactoryByRegionType(String regionType);


    List<BdFactory> getRootFactory();


}
